
set( UTIL_INCLUDES
    boyer_moore.h
    cpp_macros.h
    endian.h
    event_gen.h
    infractions.h
    kmap.h
    memcap_allocator.h
    primed_allocator.h
    safec.h
    segment_mem.h
    sflsq.h
    stats.h
    util.h
    util_ber.h
    util_cstring.h
    util_jsnorm.h
    util_unfold.h
    util_utf.h
)

add_library ( utils OBJECT
    ${UTIL_INCLUDES}
    ${SNPRINTF_SOURCES}
    boyer_moore.cc
    dnet_header.h
    dyn_array.cc
    dyn_array.h
    kmap.cc
    segment_mem.cc
    sflsq.cc
    snort_bounds.h
    stats.cc
    util.cc
    util_ber.cc
    util_cstring.cc
    util_jsnorm.cc
    util_net.cc
    util_net.h
    util_unfold.cc
    util_utf.cc
    ${TEST_FILES}
)

if ( HAVE_FLATBUFFERS )
    target_include_directories( utils PRIVATE ${FLATBUFFERS_INCLUDE_DIR} )
endif()

install (FILES ${UTIL_INCLUDES}
    DESTINATION "${INCLUDE_INSTALL_PATH}/utils"
)

add_subdirectory(test)

